﻿@model TruckingApplication.Dal.EntityModels.PAYMENT

@{
    ViewBag.Title = "Create Payment";
}

<link href="@Url.Content("~/Content/jquery-ui.css")" rel="stylesheet" type="text/css" />

<h2>Create Payment</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
<script type="text/javascript">
    $(document).ready(function () {
        //$('#paymentDate').datepicker();
    });
</script>


@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <div id="lowerContainer">
		<div id="lowerContainerInner">
    <fieldset>
        
        <table id="tableMgmt" style="width: 100%;">
            <tr>
                <td>
                    @Html.LabelFor(model => model.paymentType)
                </td>
                <td>    
                    @*<select name="sel_paymentType">
                      <option selected="selected">Select One</option>
                      <option value="Payable">Payable</option>
                      <option value="Receivable">Receivable</option>
                    </select>*@
                    @(Html.Kendo()
                        .DropDownList()
                        .Name("sel_paymentType")
                        .BindTo(new List<SelectListItem>()
                        {
                            new SelectListItem(){
                                Text = "Select One",
                                Value = "-1",
                                Selected = true   
                            },
                            new SelectListItem(){
                                Text = "Payable",
                                Value = "Payable"
                            },
                            new SelectListItem(){
                                Text = "Receivable",
                                Value = "Receivable"
                            },
                        })
                        .HtmlAttributes(new { style = "width:200px" })
                        .Value("-1")
                    )
                </td>
            </tr>
            <tr>
                <td>
                    @Html.LabelFor(model => model.resourceID)
                </td>
                <td>
                    @*@Html.DropDownList("MyResources", "Select One")*@
                    @(Html.Kendo()
                        .DropDownList()
                        .Name("MyResources")
                        .BindTo(ViewBag.MyResources as SelectList)
                        .HtmlAttributes(new { style = "width:200px" })
                    )
                </td>
            </tr>
            <tr>
                <td>
                    @Html.LabelFor(model => model.paymentFrom)
                </td>
                <td>
                    @Html.EditorFor(model => model.paymentFrom)
                    @Html.ValidationMessageFor(model => model.paymentFrom)
                </td>
            </tr>
            <tr>
                <td>
                    @Html.LabelFor(model => model.paymentFor)
                </td>
                <td>
                    @Html.EditorFor(model => model.paymentFor)
                    @Html.ValidationMessageFor(model => model.paymentFor)
                </td>
            </tr>
            <tr>
                <td>
                    @Html.LabelFor(model => model.paymentDate)
                </td>
                <td>
                    @(Html.Kendo().DatePickerFor(model => model.paymentDate).Name("paymentDate").HtmlAttributes(new { style = "width:200px" }))
                    @Html.ValidationMessageFor(model => model.paymentDate)
                </td>
            </tr>
            <tr>
                <td>
                    @Html.LabelFor(model => model.paymentAmount)
                </td>
                <td>
                    @Html.EditorFor(model => model.paymentAmount)
                    @Html.ValidationMessageFor(model => model.paymentAmount)
                </td>
            </tr>
        </table>

        <p>
            <input type="submit" value="Create" class="button default btnLarge" />
            @Html.ActionLink("Cancel", "Dashboard", "Account", null, new { @class = "button cancel btnLarge" })
        </p>
    </fieldset>
        </div>
    </div>
}